package com.fottas.adware.portal.util;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.FileSystemXmlApplicationContext;

public class HeapOOM {
    public static final int _1MB = 1024 *  1024;

    public static void  test() {
        byte[] a1, a2, a3, a4;
        a1 = new byte[_1MB/4];
        a2 = new byte[_1MB/4];
        a3 = new byte[4 * _1MB];
        a4 = new byte[4 * _1MB];
//        a4 = null;
        a4 = new byte[4 * _1MB];
    }

    public static void main(String[] args) {
        test();
        String xmlPath = "WebContent/WEB-INF/config/base/applicationContext.xml";
        ApplicationContext ac = new FileSystemXmlApplicationContext(xmlPath);
        ac.getBean("");
    }
}
